package com.linkoog.devtools.type.impl;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.linkoog.devtools.type.Type;
import com.linkoog.devtools.type.TypeBase;
import lombok.Getter;

public class MapType extends TypeBase {

    @Getter
    private final Type keyType;
    @Getter
    private final Type valType;

    @JsonCreator
    public MapType(@JsonProperty("keyType")Type keyType, @JsonProperty("valType")Type valType) {
        super("Map<" + keyType.getTypeName() + "," + valType.getTypeName() + ">", "Array[" + keyType.getTypeFullName() + "," + valType.getTypeFullName() + "]");
        this.keyType = keyType;
        this.valType = valType;
    }

}
